<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>serVersion</title>
    <script src="/static/js/userOps.js"></script>
    <script>
        function adfasdfas() {
            console.log("click");
            var code = document.getElementById("version").value;
            var desp = document.getElementById("desp").value;
            console.log("Setting code to " + code);
            console.log("Setting code to " + desp);
            var jsonObj = {
                version_code: code,
                desp: desp
            };
            var resp = doAjaxCall(jsonObj, "/api/version_code");
//            console.log()
        }
        function update() {
            req = doAjaxGet('/api/version_code');
            console.log(req);
            document.getElementById("version").value = req['version_code'];
            document.getElementById("desp").value = req['desp'];
        }
    </script>
</head>
<body>


<labe> Version Code</labe>
<input type="text" id="version">
<br>
<label>Desp</label>
<textarea cols="40" rows="5" id="desp"> </textarea>
<br>
<input type="button" onclick="adfasdfas()" value="Set">
<input type="button" onclick="update()" value="Get">


</body>
</html>